﻿using BwTMusicModels;
using HwjUIDI.Utility.DatabaseHelper;
using System;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BwTServices.Country
{
    public class CountryServices
    {
        public List<North_Country> GetAllCountryList()
        {
            List<North_Country> countries = new List<North_Country>();
            try
            {
                string sql = "select * from North_Country";
                using (SqlDataReader dr = DatabaseFactory.GetDatabase().ExecuteDataReaderSQL(sql))
                {
                    while (dr.Read())
                    {
                       countries.Add( new ModelsHelper().GetNorthCountryModels(dr));
                    }
                }
            }
            catch (Exception)
            {
            }
            return countries;
        }
    }
}
